package com.gdpu.project.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.gdpu.page.vo.QueryResult;
import com.gdpu.project.vo.CgConference;
import com.gdpu.project.vo.CgInnovate;
import com.gdpu.project.vo.CgPatent;
import com.gdpu.project.vo.CgProject;
import com.gdpu.project.vo.CgThesis;
import com.gdpu.project.vo.CgTreatise;
import com.gdpu.project.vo.Teacher;

public interface ChengGuoService {
	//教师Service
	public Teacher findTeacherById(String id);
	
	// 学术会议Service
	public Boolean addCgConference(CgConference cgConference);

	public Boolean updateCgConference(CgConference cgConference);

	public Boolean deleteCgConferenceById(int id);

	public QueryResult<CgConference> findAllCgConference(int firstindex,int maxresult);

	public CgConference findCgConference(int id);

	public QueryResult<CgConference> findAllCgConferenceByTeacherId(String teacherId,int firstindex,int maxresult);

	// 学生科技创新Service
	public Boolean addCgInnovate(CgInnovate cgInnovate);

	public Boolean updateCgInnovate(CgInnovate cgInnovate);

	public Boolean deleteCgInnovateById(int id);

	public QueryResult<CgInnovate> findAllCgInnovate(int firstindex,int maxresult);

	public CgInnovate findCgInnovate(int id);
	/**
	 *根据教师id 分页查找CgInnovate
	 * @param teacherId
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<CgInnovate> findAllCgInnovateByTeacherId(String teacherId,int firstindex,int maxresult);
	/**
	 *根据教师id 查找全部CgInnovate
	 * @param teacherId
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<CgInnovate> findAllCgInnovateByTeacherId(String teacherId);

	// 专利Service
	public Boolean addCgPatent(CgPatent cgPatent);

	public Boolean updateCgPatent(CgPatent cgPatent);

	public Boolean deleteCgPatentById(int id);

	public QueryResult<CgPatent> findAllCgPatent(int firstindex,int maxresult);

	public CgPatent findCgPatent(int id);

	public QueryResult<CgPatent> findAllCgPatentByTeacherId(String teacherId,int firstindex,int maxresult);

	// 论文Service
	public Boolean addCgThesis(CgThesis cgThesis);//通过实例增加论文

	public Boolean updateCgThesis(CgThesis cgThesist);//通过实例更新论文

	public Boolean deleteCgThesisById(int id);//通过Id删除论文
	/**
	 * 分页查出所有论文
	 * @param firstindex 开始索引
	 * @param maxresult 每页记录数
	 * @return 该页论文列表
	 */
	public QueryResult<CgThesis> findAllCgThesis(int firstindex,int maxresult);//出所有论文

	public CgThesis findCgThesis(int id);//通过Id查询论文
	/**
	 * 通过老师Id分页查找论文
	 * @param teacherId
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public  QueryResult<CgThesis> findAllCgThesisByTeacherId(String teacherId,int firstindex,int maxresult);
	/**
	 * 通过老师Id查所有论文
	 * @param teacherId
	 * @return
	 */
	public QueryResult<CgThesis> findAllCgThesisByTeacherId(String teacherId);
	// 专著Service
	public Boolean addCgTreatise(CgTreatise cgTreatiset);

	public Boolean updateCgTreatise(CgTreatise cgTreatiset);

	public Boolean deleteCgTreatiseById(int id);

	public QueryResult<CgTreatise> findAllCgTreatise(int firstindex,int maxresult);

	public CgTreatise findCgTreatise(int id);
	
	public QueryResult<CgTreatise> findAllCgTreatiseByTeacherId(String teacherId,int firstindex,int maxresult);

	// 科研项目Service
	public Boolean addCgProject(CgProject cgProject);

	public Boolean updateCgProject(CgProject cgProject);

	public Boolean deleteCgProjectById(int id);

	public QueryResult<CgProject> findAllCgProject(int firstindex,int maxresult);

	public CgProject findCgProject(int id);

	public QueryResult<CgProject> findAllCgProjectByTeacherId(String teacherId,int firstindex,int maxresult);

	//高级搜索Service
	public Map<Teacher, List<CgProject>> searchCgProject(String college, String department,
			String postion, String education, String teacherName,String cataloge);

	public  Map<Teacher, List<CgConference>> searchCgConference(String college,
			String department, String postion, String education,
			String teacherName,String cataloge);

	public  Map<Teacher, List<CgInnovate>> searchCgInnovate(String college, String department,
			String postion, String education, String teacherName,String cataloge);

	public  Map<Teacher, List<CgPatent>> searchCgPatent(String college, String department,
			String postion, String education, String teacherName,String cataloge);

	public  Map<Teacher, List<CgThesis>> searchCgThesis(String college, String department,
			String postion, String education, String teacherName,String cataloge);
	
	public  Map<Teacher, List<CgTreatise>> searchCgTreatise(String college, String department,
			String postion, String education, String teacherName,String cataloge);
	/**
	 * 专著分页查询
	 * @param college
	 * @param department
	 * @param postion
	 * @param education
	 * @param teacherId
	 * @param cataloge
	 * @param startDate
	 * @param endDate
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<CgTreatise> searchCgTreatiseByDate(String college,
			String department, String postion, String education,
			String teacherId,String cataloge,Date startDate,Date endDate,int firstindex,int maxresult);
	
	//按时间分类进行高级搜索Service
	public Map<Teacher, List<CgProject>> searchCgProjectByDate(String college, String department,
			String postion, String education, String teacherName,String cataloge,Date startDate,Date endDate);
	/**
	 * 项目分页查询
	 * @param college
	 * @param department
	 * @param postion
	 * @param education
	 * @param teacherId
	 * @param cataloge
	 * @param startDate
	 * @param endDate
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<CgProject> searchCgProjectByDate(String college,
			String department, String postion, String education,
			String teacherId,String cataloge,Date startDate,Date endDate,int firstindex,int maxresult);

	public  Map<Teacher, List<CgConference>> searchCgConferenceByDate(String college,
			String department, String postion, String education,
			String teacherName,String cataloge,Date startDate,Date endDate);
	/**
	 * 学术会议分页查询
	 * @param college
	 * @param department
	 * @param postion
	 * @param education
	 * @param teacherId
	 * @param cataloge
	 * @param startDate
	 * @param endDate
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	
	public QueryResult<CgConference> searchCgConferenceByDate(String college,
			String department, String postion, String education,
			String teacherId,String cataloge,Date startDate,Date endDate,int firstindex,int maxresult);

	public  Map<Teacher, List<CgInnovate>> searchCgInnovateByDate(String college, String department,
			String postion, String education, String teacherName,String cataloge,Date startDate,Date endDate);
	/**
	 * 科技创新分页查询
	 * @param college
	 * @param department
	 * @param postion
	 * @param education
	 * @param teacherId
	 * @param cataloge
	 * @param startDate
	 * @param endDate
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<CgInnovate> searchCgInnovateByDate(String college,
			String department, String postion, String education,
			String teacherId,String cataloge,Date startDate,Date endDate,int firstindex,int maxresult);

	public  Map<Teacher, List<CgPatent>> searchCgPatentByDate(String college, String department,
			String postion, String education, String teacherName,String cataloge,Date startDate,Date endDate);
	
	/**
	 * 专利分页查询	 
	 * @param college
	 * @param department
	 * @param postion
	 * @param education
	 * @param teacherId
	 * @param cataloge
	 * @param startDate
	 * @param endDate
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	 
	public QueryResult<CgPatent> searchCgPatentByDate(String college,
			String department, String postion, String education,
			String teacherId,String cataloge,Date startDate,Date endDate,int firstindex,int maxresult);
	public  Map<Teacher, List<CgThesis>> searchCgThesisByDate(String college, String department,
			String postion, String education, String teacherName,String cataloge,Date startDate,Date endDate);
	/**
	 * 论文分页查询
	 * @param college
	 * @param department
	 * @param postion
	 * @param education
	 * @param teacherId
	 * @param cataloge
	 * @param startDate
	 * @param endDate
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<CgThesis> searchCgThesisByDate(String college, String department,
			String postion, String education, String teacherId,String cataloge,Date startDate,Date endDate,int firstindex,int maxresult);
	
	
	public  Map<Teacher, List<CgTreatise>> searchCgTreatiseByDate(String college, String department,
			String postion, String education, String teacherName,String cataloge,Date startDate,Date endDate);
	
	/**
	 * 图表统计分析
	 * @param s 按部门（department）、学历(education)、职称(postion)查询
	 * (s只能取department\education\postion)
	 * @param s2 按成功类别查询
	 * (s2只能取值为CgProject\CgConference\CgInnovate\CgPatent\CgThesis\CgTreatise)
	 * @return 所属部门（学历、职称）的成果数统计
	 */
	public Map<String, String> analyse(String s,String s2);

	
}
